<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <link rel="stylesheet" href="./css/reset.css">
    <link rel="stylesheet" href="./css/login.css">
    <!-- <link rel="stylesheet" href="//at.alicdn.com/t/font_2673097_g8rbo5ot3lb.css"> -->
    <link rel="stylesheet" href="./font/iconfont.css">
</head>
<body>
    <div class="container">
        <div class="imgContent"></div>
        <div class="loginData">
            <div class="websiteName">
                <h3>南声-分享源于热爱</h3>
            </div>
            <div class="info">
                <input id="username" type="text" placeholder="请输入用户名">
                <span>请输入用户名</span>
            </div>
            <div class="info">
                <input id="password" type="password" placeholder="请输入用户密码">
                <span>请输入用户密码</span>
            </div>
            <div class="info">
                <button id="submitLogin">登 录</button>
            </div>
            <div class="userOperation">
                <a href="#">创建一个 ID</a>
            </div>
            <div class="userOperation">
                <a href="#">忘记密码?</a>
            </div>
            <div>
                <i class="iconfont icon-wechat"></i>
                <i class="iconfont icon-qq"></i>
                <i class="iconfont icon-github"></i>
            </div>
        </div>
    </div>

    <script src="./js/jquery.js"></script>
    <script>
        $('#submitLogin').click(function(){
            if($('#username').val() != null && $('#password').val() != null && $('#username').val().trim() != '' && $('#password').val().trim() != ''){
                let userData = {
                    username:$('#username').val(),
                    password : null
                }
                window.sessionStorage.setItem('loginer',JSON.stringify(userData));
                // 跳转index页面
                window.location.href = './index.html';
            }else{
                alert('请正确填写信息');
            }
        })
    </script>
</body>
</html>